package com.my.json.domain;

import com.my.json.sensitive.annotation.SensitiveField;
import com.my.json.sensitive.enums.SensitiveType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * https://blog.csdn.net/wohaqiyi/article/details/87382509
 * @author timo 2021/3/3
 */
//@XmlRootElement表示当前标签的名字
//@XmlType表示当前对象里，含有的下级标签对应的对象的属性名。
//@XmlElement表示当前对象的属性，对应到xml里的标签名。
@XmlAccessorType(XmlAccessType.FIELD)
//@XmlType(propOrder={"aac002","aac003"})
@XmlRootElement(name="input")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class InputXml {
    //xml转换
    @XmlElement(name="aac003")
    //铭感字过滤
    @SensitiveField(type = SensitiveType.CHINESE_NAME)
    private String userName;
    @XmlElement(name="aac002")
    private String idCard;
    @XmlElement(name="jybh")
    private String jybh;
}
